{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Transfer Learning Demo\n",
    "\n",
    "## Getting Started\n",
    "Use of a virtual enviornment is highly recommended although not required. \n",
    "```bash\n",
    "virtualenv .venv\n",
    "source .venv/bin/activate\n",
    "```\n",
    "\n",
    "`pip install -r requirements.txt` will install the following packages necessary for this demo to run.\n",
    "- ngraph_tensorflow_bridge\n",
    "- tensorflow==1.14.0\n",
    "- plaidml-keras\n",
    "- pillow\n",
    "- matplotlib\n",
    "- jupyter\n",
    "\n",
    "For PlaidML devices, run `plaidml-setup` before starting this demo to select the Plaidml backend device.\n",
    "\n",
    "Once the interface is presented, setup the model and network along with epoch and batch size values then hit the Train button to start. The demo will initialize test images and then start with a prediction with the model selected using pretrained `imagenet` weights. The demo will then automaticall proceed into the training phase followed by another predition phase based on the trained model.\n",
    "\n",
    "The demo will present 9 randomly selected test images where the initial prediction incorrectly guessed and then the same 9 image predictions after the model has been trained.\n",
    "\n",
    "## Other details\n",
    "Menu Bar --> Cell --> Current Outputs --> Toggle Scrolling to stop Jupyter Notebook from creating scrollable boxes when the images appear.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "import TransferLearningGui\n",
    "demo = TransferLearningGui.TrainingDemoGui()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
